package cn.akwangl.concurrency.web.event;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;

/**
 * 事件简单工厂
 *
 * @author 阿坤同学
 * @date 2025/2/14 09:34
 */
public class EventFactory {

    private EventFactory() {

    }

    public static SourceEvent createSourceEvent(Object source) {
        SourceEvent sourceEvent = new SourceEvent(source);
        sourceEvent.setName("source_event_" + IdWorker.getId());
        return sourceEvent;
    }
}
